POST
/
v1
/
inventory
/
warehouses
/
{id}
/
locations
/
batch
Batch update Locations
curl --request POST \
  --url https://{base_url_domain}/api/global/v1/inventory/warehouses/{id}/locations/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "onError": "continue",
  "operation": "upsert",
  "locations": [
    {
      "label": "RK07-R2-S1-L1",
      "rack": {
        "type": "Rack",
        "id": 3
      },
      "location_type": {
        "type": "LocationType",
        "id": 3
      },
      "priority": 2
    }
  ]
}'
{
  "committed": 1,
  "failed": 1,
  "results": [
    {
      "resource": {
        "type": "Location",
        "id": 42,
        "label": "RK07-R2-S1-L1"
      },
      "status": "committed",
      "message": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Generate a JWT access token through a Custom Global Integration and provide it with each request in the Authorization header prefixed with "Bearer" and then a single space.

Path Parameters

id
integer
required

The id of the referenced Warehouse.

Required range: x >= 1

Body

application/json

An object conforming to the Inventory Warehouse Location schemas batch to be created or updated.

onError
enum<string>
default:continue

The value determining how errors are to be handled.

  • continue The current entity will be rolled back and any remaining entities will continue to be processed.
  • stop The current entity will be rolled back and the request will stop processing any remaining entities.
  • abort The entire request will be rolled back.
Available options:
continue,
stop,
abort
operation
enum<string>
default:upsert
  • upsert: Create if it doesn't exist, otherwise update
  • insert: Create only, existing locations will not be updated
  • update: Update existing locations, no locations will be created
  • delete: Delete locations
Available options:
upsert,
insert,
update,
delete
locations
LocationCreateUpdateRef Β· object[]

Response

No fatal client or server errors occurred. Check the response to see which items were updated successfully.

committed
integer

Number of locations that were successfully inserted/updated in this batch.

Example:

1

failed
integer

The number of locations that could not be updated due to an error. Check the response results for more details.

Example:

1

results
object[]

An array of objects describing the resources that were created.

Minimum length: 1